package com.joinway.framework.data.jdbc.bean;

import java.util.List;

import org.jsondoc.core.annotation.ApiObject;
import org.jsondoc.core.annotation.ApiObjectField;

import com.joinway.framework.bean.domain.constant.SqlConstants;

@ApiObject(name = "SaveCriteria", description = "RMDB保存SQL格式")
public class SaveCriteria extends Criteria {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@ApiObjectField(description="要保存的字段") 
	private List<CriteriaItem> targets;
	
	@ApiObjectField(description="保存类型，默认为updateOrInsert",required=false,format="update,insert,updateOrInsert") 
	private String action = SqlConstants.PersistenceAction.UpdateOrInsert;

	public List<CriteriaItem> getTargets() {
		return targets;
	}

	public void setTargets(List<CriteriaItem> targets) {
		this.targets = targets;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}
}
